<?php 
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
MYDCONN();
$GLOBALS['MYT']=$GLOBALS['MYD'];
	form_pr('QueryRequests','','','post'); ?>
<div class="title">Pedidos de Materiais e ServiÇos 
	<input name="Insert" type="submit" id="Insert" value="Novo Pedido de Materiais"></div>
<div class="Line">
<table width="100%"  border="0" cellpadding="3" cellspacing="1">
    <tr bgcolor="#ACB1CC">
      <td colspan="7">Filtro</td>
  </tr>
  <tr bgcolor="#FBFBFB">
    <td>Periodo</td>
    <td width="40%" bgcolor="#FBFBFB"><?php mn_field('date','ED','TimeStart','','QueryRequests','8','',''); ?> e <?php mn_field('date','ED','TimeEnd','','QueryRequests','8','',''); ?></td>
    <td width="12%">Estado: 
      <?php
	mn_field('select','ED','Status','',"SELECT Ref AS ID, name AS NAME FROM hcce_status WHERE Type = 0",'Todos','',''); ?></td>
    <td width="18%">Loja:
      <?php
	mn_field('select','ED','Offices','',"SELECT ref AS ID, name AS NAME FROM main_offices WHERE Type IN (1,2,5)",'Todos','',''); ?></td>
    <td width="10%">Funcionario:
      <?php
	mn_field('select','ED','Users','',"SELECT ref AS ID, name AS NAME FROM main_users WHERE Type IN (1,2,0)",'Todos','',''); ?></td>
  </tr>
	<tr><td colspan="4"><?php mn_field('button','ED','Consult','Consultar','','','','" onclick="
    		document.QueryRequests.action=\'Modules/CentrodeCustos/Lib/rsRequests.php\';
    		subform(\'QueryRequests\',\'rsRequests\');'); ?></td></tr>
</table>
</div>
</form>
<div id="rsRequests" class="Line"></div>